Element.IsValidType
Description:
Checks if given type is valid for the set of elements.
Checks if given type is valid for the set of elements.
Remarks:
A type is valid for the set of elements if it is valid for each and every element in the set.
A type is valid for the set of elements if it is valid for each and every element in the set.
Overloads (2):
IsValidType(Document,ICollection[ElementId],ElementId)
public static bool IsValidType(
Document document,
ICollection<ElementId> elementIds,
ElementId typeId
)
-
documentThe document.
-
elementIdsA collection of element IDs.
-
typeIdElementId of the type to check.
Return Value
bool
True if all elements can have a type assigned and this type is valid for all elements, false otherwise.
-
Thrown when at least one of the elements does not exist in the document.
-
A non-optional argument was NULL